package org.microdream.easy.deploy.web;

import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.Map;

@Controller
public class DFunctionWeb {

    @GetMapping("dFunction")
    public String main(){
        return "/pages/function/dFunctionMain";
    }

    @GetMapping("dFunctionAdd")
    public String dFunctionAdd(Map<String, Object> map, String id, String myName){
        map.put("id",id);
        map.put("myName", StringUtils.isNotEmpty(myName)?myName:"无");
        return "/pages/function/dFunctionAdd";
    }

    @GetMapping("dFunctionUpdate")
    public String dFunctionUpdate(Map<String, Object> map, String id){
        map.put("id",id);
        return "/pages/function/dFunctionUpdate";
    }
}
